//
//  NetWorkOperation.h
//  sp
//
//  Created by 陶秋安 on 16/2/19.
//  Copyright © 2016年 孙智慧. All rights reserved.
//

#import <Foundation/Foundation.h>

//定义委托
@protocol FxOperationDelegate;
@interface NetWorkOperation : NSObject
{
    id<FxOperationDelegate> _delegate;
    
@public NSDictionary *_opInfo;
}
- (id)initWithDelegate:(id<FxOperationDelegate>)delegate;

-(void) exSuccForDownLoad:(id)location andFlag:(NSString *) flag;
-(void) exSuccForGet:(id)data;
-(void) exSuccForPost:(id)data;
-(void) down;
-(void) get:(NSInteger)flag;
-(void) post;
-(void) setOpInfo:(NSDictionary *)opInfo;
@end

@protocol FxOperationDelegate <NSObject>

- (void)opSuccessForDownLoad:(id)data andFlag:(NSString *) flag;
- (void)opSuccessForGet:(id)data andFlag:(NSInteger)flag;
- (void)opSuccessForPost:(id)data;
- (void)opFail:(NSString *)errorMessage;

@optional
- (void)opSuccessEx:(id)data opinfo:(NSDictionary *)dictInfo;
- (void)opFailEx:(NSString *)errorMessage opinfo:(NSDictionary *)dictInfo;
- (void)opSuccessMatch:(id)data;
- (void)opUploadSuccess;
- (void)opSuccessForPostEx:(id)data;
@end